﻿<extend name="Public:base" />
<block name="body">
    <style type="text/css">
       .input-group {
        /* position: relative; */
        display: table;
        border-collapse: separate;
        width: 200px;
    }   

    #import_excel_form{
        display: inline-block;
    }

</style>
<!--引入弹窗插件-->
<include file="Public:artdialog" />

<div class="main-content">

    <div class="breadcrumbs" id="breadcrumbs">
        <script type="text/javascript">
            try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
        </script>
        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
 <span style="color:#428bca">{$parent_nav.name}</span>
            </li>
            <li class="active">{$one_nav.name}</li>
        </ul><!-- .breadcrumb -->
    </div>
    <style type="text/css">
        .page-content {
            padding: 0px 24px 24px;
        }

        .porlets-content_title {
            height: 49px;
            background: #b6d1f2;
        }
        .col-md-12 .icon-table{
            color: #FFFFFF;
            font-size: 18px;
            font-weight: bolder;
            line-height: 49px;
        }
        form button{
            margin-right: 5px !important ;
            margin-bottom:5px !important;
        }
    </style>
    <div class="page-content">
        <form action="/admin.php?s=/Order/OrderList.html" method="post" id="searchForm2" style="display: block;">

        <div class="row">
            <div class="col-md-12">
                <div class="block-web">
                    <div class="row">
                        <div style="padding: 20px 0;background: #e9f0f9;height:100%;">
                            <form action="/admin.php?s=/Order/OrderList.html" method="post" id="searchForm" style="display: block;">
                                <div class="form-group" style="float: left;">
                                    <div class="input-group col-sm-3">
                                        <input class="form-control" id="title" type="text" name="title" placeholder="请输入搜索条件/订单号/源系统订单号" size="15">
                                    </div>
                                </div>
                                <div class="form-group" style="float: left;">
                                    <div class="input-group col-sm-3">
                                        <input class="form-control" id="consignee" type="text" name="consignee" placeholder="请输入收货人">
                                    </div>
                                </div>
                                <div class="form-group" style="float: left;">
                                    <div class="input-group col-sm-3">
                                        <input class="form-control" id="tel" type="text" name="tel" placeholder="请输入手机号码">
                                    </div>
                                </div>
                                <div class="form-group" style="float: left;">
                                    <div class="input-group col-sm-3">
                                        <input class="form-control date-picker" id="start_time" type="text" name="start_time" data-date-format="dd-mm-yyyy" size="15">
                                        <span class="input-group-addon"><i class="icon-calendar bigger-110"></i></span>
                                    </div>
                                </div>

                                <div class="form-group" style="float: left;">
                                    <div class=" input-group  col-sm-3">
                                        <!-- <input name="end_time" readonly="readonly" class="laydate-icon" type="text" id="end_time"  size="15"> -->
                                        <input class="form-control date-picker" id="end_time" name="end_time" type="text" data-date-format="dd-mm-yyyy" size="15">
                                        <span class="input-group-addon"><i class="icon-calendar bigger-110"></i></span>
                                    </div>
                                </div>

                                <div style="float: left;">
                                    <button type="button" class="btn btn-sm btn-info" onclick="load()"> 搜索<tton>
                                        <button type="button" class="btn btn-sm btn-info" onclick="$('input[type=text]').val(['']);$('select').val('');load();"> 查看所有<tton>
                                            <button type="button" class="btn btn-sm btn-info" onclick="export_excel()"> 导出EXCEL<tton>
                                            </div>
                                            <div class="clearfix"></div>
                                        </form>
                                        <!-- <button type="button" class="btn btn-info" onclick="import_excel()"> 导入EXCEL<tton> -->
                                        <form method="post" action="/admin.php?s=/Order/import_excel/nav_id/88.html" id="import_excel_form" enctype="multipart/form-data" style="display:block;">
                                            <input type="hidden" name="nav_id" value="88">
                                            <input type="button" class="btn btn-sm btn-info" value="导入EXCEL并下单" size="30" onclick="f.click()" />
                                            <input type="file" id="f" onchange="this.form.submit()" name="f" style="position:absolute; filter:alpha(opacity=0); opacity:0; width:30px; " size="1" />
                                            <a class="" target="_blank" href="/Public/Admin/excel订单下载模板.xls">下载EXCEL下单模板</a>
                                        </form>
                                    </div>

                                </div>
                                <div class="porlets-content">
                                    <div class="porlets-content_title" style="margin:0 -12px;">
                                        <div class="row"  >
                                            <div class="col-md-12 icon-table">{$one_nav.name}</div>
                                        </div>
                                    </div>
                                    <div class="table-responsive" style="margin:0 -12px;">
                                        <div id="order_list_item_content">
                                            <div class="item-list-bd" style="height:100px;line-height:100px;text-align:center;">
                                                <img src="__PUBLIC__/admin/images/load3.gif" />
                                                加载中...
                                            </div>
                                        </div>
                                    </div><!--/porlets-content-->
                                </div><!--/block-web-->


                            </div><!--/col-md-12-->
                        </div>


                    </div>
                    </from>
                </div>
                <script type="text/javascript" src="__PUBLIC__/laydate/laydate.dev.js"></script>
                <script type="text/javascript">

    laydate({
                        elem: '#end_time ',
        festival: true, //显示节日
        istime: true,
        // min: laydate.now(),
        start: laydate.now(0,"YYYY/MM/DD "),  //设置开始时间为当前时间
        format: 'YYYY-MM-DD hh:mm:ss'
    })
                    laydate({
                        elem: '#start_time ',
        festival: true, //显示节日
        // min: laydate.now(),
        start: laydate.now(0,"YYYY/MM/DD "),  //设置开始时间为当前时间
        istime: true,
        format: 'YYYY-MM-DD hh:mm:ss'
    })

                    $(function(){
                        goSearch("#searchForm2","order_list_item_content");
                      $(document).keydown(function(event){ 
                        if(event.keyCode==13){ 
                        load(); 
                        } 
                            })
                    });

                    function load(){
                        var data = $("#searchForm2").serialize();
                        goSearch("#searchForm2","order_list_item_content");
                    }

                    function toParentChilder(id){
                        $('#parent_id').val(id);
                        goSearch("#searchForm2","order_list_item_content");
                    }

                    function clock_load_dialog(){
                     setTimeout(function(){
                        var win=    art.dialog.opener;
                        win.load();
                        top.art.dialog().close();
                    },800);
                 }

                 function _es_openDilog90(url, title,id){ 
                   art.dialog.open(url, { title: title, width: '1200px', height: '90%', opacity: 0.2, id: id, fixed: true, close:function(){load();}  });
               }

               function export_excel(){
                var form = document.forms[0];
                form.action ="{:U('Order/export_excel')}";
                form.submit();
                return true;

            }
        </script>
    </block>
